package com.baizhi.mapper;

import com.baizhi.pojo.Account;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@ContextConfiguration("classpath:applicationContext.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class AccountMapperTest01 {

    @Autowired
    private AccountMapper accountMapper;

    @Test
    public void selectAccountByIdTest(){
        Account account = accountMapper.selectAccountById(1);
        System.out.println(account);
    }

    @Test
    public void updateAccountByIdTest(){
        Integer rows = accountMapper.updateAccountById(1, 3000);
        System.out.println(rows);
    }
}
